//package com.linqingying.cangjie.ide.project.tools.projectWizard.core
//
//
//class SettingContext {
//    private val values = mutableMapOf<String, Any>()
//    private val pluginSettings = mutableMapOf<String, PluginSetting<*, *>>()
//    val eventManager = EventManager()
//
//    @Suppress("UNCHECKED_CAST")
//    operator fun <V : Any, T : SettingType<V>> get(
//        reference: SettingReference<V, T>
//    ): V? = values[reference.path] as? V
//
//    operator fun <V : Any, T : SettingType<V>> set(
//        reference: SettingReference<V, T>,
//        newValue: V
//    ) {
//        values[reference.path] = newValue
//        eventManager.fireListeners(reference)
//    }
//
//    @Suppress("UNCHECKED_CAST")
//    fun <V : Any, T : SettingType<V>> getPluginSetting(pluginSettingReference: PluginSettingReference<V, T>) =
//        pluginSettings[pluginSettingReference.path] as PluginSetting<V, T>
//
//    fun <V : Any, T : SettingType<V>> setPluginSetting(
//        pluginSettingReference: PluginSettingReference<V, T>,
//        setting: PluginSetting<V, T>
//    ) {
//        pluginSettings[pluginSettingReference.path] = setting
//    }
//}
